define(function (require, exports, module) {
    'use strict';
    var base = require('js/utils/model'),
        _ = require('underscore');

    var Channels = base.Model.extend({
        defaults: {},
        url: '/admin/report/channels/',
        list: [],
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                return resp.data;
            }
            return this.defaults;
        }
    });
    var ActivityTypes = base.Model.extend({
        defaults: {},
        url: '/admin/report/activity_types/',
        list: [],
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                return resp.data;
            }
            return this.defaults;
        }
    });
    var UserOverview = base.Model.extend({
        defaults: {
            today: {},
            yesterday: {},
            this_month: {},
            all: {}
        },
        url: "/admin/report/overview/user/",
        parse: function (response) {
            if (response.data) {
                return response.data;
            }
            return this.defaults;
        }
    });
    var ActivityOverview = base.Model.extend({
        defaults: {
            today: {},
            yesterday: {},
            this_month: {},
            all: {}
        },
        url: "/admin/report/overview/activity/",
        parse: function (response) {
            if (response.data) {
                return response.data;
            }
            return this.defaults;
        }
    });
    var CostOverview = base.Model.extend({
        defaults: {
            today: {},
            yesterday: {},
            this_month: {},
        },
        url: "/admin/report/overview/cost/",
        parse: function (response) {
            if (response.data) {
                return response.data;
            }
            return this.defaults;
        }
    });

    var ActivityStats = base.Model.extend({
        defaults: {},
        list: [],
        url: '/admin/report/activity/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                return resp.data;
            }
            return this.defaults;
        }
    });
    var ActivityReport = base.Model.extend({
        defaults: {},
        list: [],
        details: {},
        sum: {},
        url: '/admin/report/activity/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.sum = resp.data.sum;
                this.details = resp.data.activity_details;
                return resp.data;
            }
            return this.defaults;
        }
    });
    var DailyReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/",
        list: [],
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
            }
            return response.data;
        }
    });
    var DailyKsReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/ks/",
        list: [],
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
            }
            return response.data;
        }
    });
    var ProfitReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/profit/",
        list: [],
        sum: {},
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                this.sum = response.data.sum;
            }
            return response.data;
        }
    });
    var RechargeReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/recharge/",
        parse: function (response) {
            if (response.data) {
                return response.data;
            }
        }
    });
    var RechargeInterval = base.Model.extend({
        defaults: {},
        url: "/admin/report/interval/recharge/",
        list: [],
        sum: {},
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
            }
            return response.data;
        }
    });
    var TacticsReport = base.Model.extend({
        defaults: {},
        total: {},
        list: [],
        url: "/admin/report/daily/tactics/",
        parse: function (response) {
            if (response.data) {
                this.total = response.data.total;
                this.list = response.data.list;
                return response.data;
            }
            return this.defaults;
        }
    });
    var CoinReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/resource/coin/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                this.gen_dist = response.data.gen_dist;
                this.cost_dist = response.data.cost_dist;
                return response.data;
            }
            return this.defaults;
        }
    });
    var CreditReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/resource/credit/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                this.gen_dist = response.data.gen_dist;
                this.cost_dist = response.data.cost_dist;
                return response.data;
            }
            return this.defaults;
        }
    });
    var ShippingReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/shipping/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                this.info = response.data.info;
                return response.data;
            }
            return this.defaults;
        }
    });
    var Top100List = base.Model.extend({
        defaults: {},
        list: [],
        url: "/admin/report/top100/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                return response.data;
            }
            return this.defaults;
        }
    });
    var TopBigbangList = base.Model.extend({
        defaults: {},
        list: [],
        url: "/admin/report/top100/bigbang/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                return response.data;
            }
            return this.defaults;
        }
    });
    var CouponReport = base.Model.extend({
        defaults: {},
        url: "/admin/report/daily/resource/coupon/",
        parse: function (response) {
            if (response.data) {
                this.list = response.data.list;
                this.gen_dist = response.data.gen_dist;
                this.cost_dist = response.data.cost_dist;
                return response.data;
            }
            return this.defaults;
        }
    });
    var LotteryReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/report/lottery/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    var FruitReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/report/fruit/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    var BullReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/report/bull/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    var KfcReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/report/kfc/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    var GameReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/game_list_report/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });
    
    var MetisTigerReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/metis_report/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    var MetisSixReport = base.Model.extend({
        defaults: {},
        list: [],
        dist: {},
        url: '/admin/metis_report/',
        parse: function (resp) {
            if (resp.data) {
                this.list = resp.data.list;
                this.dist = resp.data.dist;
                return resp.data;
            }
            return this.defaults;
        }
    });

    module.exports = {
        Channels: Channels,
        UserOverview: UserOverview,
        ActivityOverview: ActivityOverview,
        CostOverview: CostOverview,
        ActivityStats: ActivityStats,
        ActivityReport: ActivityReport,
        DailyReport: DailyReport,
        DailyKsReport: DailyKsReport,
        ProfitReport: ProfitReport,
        RechargeReport: RechargeReport,
        TacticsReport: TacticsReport,
        CoinReport: CoinReport,
        CouponReport: CouponReport,
        Top100List: Top100List,
        TopBigbangList: TopBigbangList,
        ShippingReport: ShippingReport,
        LotteryReport: LotteryReport,
        FruitReport: FruitReport,
        BullReport: BullReport,
        KfcReport: KfcReport,
        ActivityTypes: ActivityTypes,
        RechargeInterval: RechargeInterval,
        GameReport: GameReport,
        MetisTigerReport: MetisTigerReport,
        MetisSixReport: MetisSixReport
    };

});
